import { getResponsiveSize } from '~utils/util'

export const chart = {
  chartData1: {
    chartData: {
      xData: ['系列1', '系列2', '系列3'],
      seriesData: [
        {
          name: 'A',
          data: [32, 30, 35],
          type: 'pictorialBar',
          symbol: 'rect',
          symbolSize: [getResponsiveSize(54), '100%'],
          animationDelay(idx) {
            return idx * 300
          },
          offsetX: getResponsiveSize(-30)
        },
        {
          name: 'B',
          data: [55, 61, 41],
          type: 'pictorialBar',
          symbol: 'rect',
          symbolSize: [getResponsiveSize(54), '100%'],
          animationDelay(idx) {
            return idx * 300 + 150
          },
          offsetX: getResponsiveSize(35)
        }
      ]
    },
    yAxisName: [''],
    unit: '',
    colorList: ['#1BB8FA', '#FFFC28']
  },

  chartData2: {
    chartData: {
      xData: ['系列1', '系列2', '系列3'],
      seriesData: [
        {
          name: 'A',
          data: [40, 52, 33],
          type: 'bar',
          stack: 'a',
          barWidth: getResponsiveSize(40),
          offsetX: getResponsiveSize(-44)
        },
        {
          name: 'B',
          data: [36, 25, 65],
          type: 'bar',
          stack: 'b',
          barWidth: getResponsiveSize(40),
          offsetX: 0
        },
        {
          name: 'C',
          data: [22, 78, 59],
          type: 'bar',
          stack: 'c',
          barWidth: getResponsiveSize(40),
          offsetX: getResponsiveSize(44)
        }
      ]
    },
    yAxisName: [''],
    unit: '',
    colorList: [
      ['#0048cb', '#08b1ff'],
      ['#FB8658', '#FDC061'],
      ['#FBC758', '#FFFD7B']
    ]
  },

  chartData3: {
    chartData: {
      xData: ['系列1', '系列2', '系列3', '系列4'],
      seriesData: [
        {
          name: '数量',
          type: 'pictorialBar',
          symbol: 'rect',
          symbolRepeat: true,
          symbolSize: [getResponsiveSize(4), getResponsiveSize(16)],
          symbolMargin: getResponsiveSize(2),
          z: 2,
          data: [160000, 136000, 20000, 2000]
        },
        {
          name: '',
          type: 'pictorialBar',
          symbol: 'rect',
          symbolRepeat: true,
          symbolSize: [getResponsiveSize(4), getResponsiveSize(16)],
          symbolMargin: getResponsiveSize(2),
          z: 1,
          data: [180000, 180000, 180000, 180000]
        }
      ]
    },
    yAxisName: [''],
    unit: '',
    colorList: ['#3FFDFF', '#021636']
  }
}
